package com.adfm.ws;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import com.adfm.bo.CRMinterface;

@WebService
public class CRMWS{

	//DI via Spring
	CRMinterface crm;

	@WebMethod(exclude=true)
	public void setCrm(CRMinterface crm) {
		this.crm = crm;
	}


	@WebMethod(operationName="paiementInterrompu")
	public String paiementInterrompu(@WebParam(name="idBonCommande") Long idBonCommande, @WebParam(name="info")  String InformationEtat) {

		return crm.paiementInterrompu(idBonCommande, InformationEtat);
		
	}
	

	@WebMethod(operationName="paiementEffectue")
	public String initialiserEnvoiCommande(@WebParam(name="idBonCommande") Long idBonCommande) {
		
		return crm.paiementEffectue(idBonCommande);
	}
	
	@WebMethod(operationName="annulerBonCommande")
	public String annulerBonCommande(@WebParam(name="idBonCommande") Long idBonCommande) {
		
		return crm.annulerBonCommande(idBonCommande);
		
	}
 
	@WebMethod(operationName="setReferenceTransactionPaiement")
	public String setReferenceTransactionPaiement(@WebParam(name="idBonCommande") Long idBonCommande, @WebParam(name="transactionPaiement") String referenceTransactionPaiement) {
		
		return crm.setReferenceTransactionPaiement(idBonCommande, referenceTransactionPaiement);
		
	}
}